<template>
<view class="msg">
    <image src='https://www.ahlinghui.com/Uploads/image/20190429/images/Product.png?1' mode='widthFix' class='response'></image>
    <view class='nav-list'>
        <navigator open-type="navigate" hover-class='none' :url="'/pages/' + item.url + '/' + item.url + '?list=' + item.list" navigateTo  class="nav-li" :class="'bg-'+item.color" 
        :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
            <view class="nav-title">{{item.title}}</view>
            <view class="nav-name">{{item.name}}</view>
            <text :class="'icon-' + item.icon"></text>
        </navigator>
    </view>
</view>
</template>

<script>
export default {
    data() {
        return {
            elements: [{
                    title: "基本信息",
                    name: "Basic",
                    color: "cyan",
                    icon: "vipcard",
                    url: "msg_basis_one",
                    list: "1"
                },
                {
                    title: "销售管理",
                    name: "Sale",
                    color: "blue",
                    icon: "mauve",
                    url: "msg_basis_one",
                    list: "2"
                },
                {
                    title: "生产管理",
                    name: "Production",
                    color: "purple",
                    icon: "list",
                    url: "msg_basis_one",
                    list: "3"
                },
                {
                    title: "采购管理 ",
                    name: "Purchase",
                    color: "mauve",
                    icon: "newsfill",
                    url: "msg_basis_one",
                    list: "4"
                },
                {
                    title: "仓库管理",
                    name: "Warehouse",
                    color: "pink",
                    icon: "formfill",
                    url: "msg_basis_one",
                    list: "5"
                },
                {
                    title: "财务管理",
                    name: "Finance",
                    color: "brown",
                    icon: "timefill",
                    url: "msg_basis_one",
                    list: "6"
                }
            ]
        };
    },
    mounted(){
        var res = global.isLogin();
        if (!res) {
            uni.showModal({
                title: '请登录',
                content: "请登录",
                showCancel:false
            })
        }
    },
};
</script>

<style>

</style>
